<template>
  <div>
    <p>练习父子组件的事件触发</p>
    <div>
      <button v-on:click="tellFathor_A">子组件触发按钮-A</button>
    </div>
  </div>
</template>

<script>
export default {
  name: 'myAhildA',
  data () {
    return {
      msgA: 'I am your child A.',
      msgB: 'I am your child B.'
    }
  },
  methods: {
    tellFathor_A: function () {
      this.$emit('childAtellme', this.msgA)
    }
  }
}
</script>
